package com.bh.order.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.bh.common.annotation.Dict;
import com.bh.common.annotation.Excel;
import com.bh.common.core.domain.BhtmsBaseEntity;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * 分段订单对象 jc_led
 * 
 * @author slx
 * @date 2023-08-20
 */
@TableName("jc_led")
@ApiModel(value = "分段订单对象", description = "分段订单对象")
@EqualsAndHashCode(callSuper = true)
@Data
public class JcLed extends BhtmsBaseEntity
{

    /** 客户订单号1 */
    @TableField(exist = false)
    private String orderCode;
    

    /**
     * 回单份数
     */
    @ApiModelProperty("回单份数")
    @Excel(name = "回单份数")
    private Integer backNumber;

    /** 合同是否超期 */
    @ApiModelProperty("合同是否超期")
    @Excel(name = "合同是否超期")
    private Integer customerIsExceed;

    /** 客户名称(零散客户) */
    @ApiModelProperty("客户名称(零散客户)")
    @Excel(name = "客户名称(零散客户)")
    private String customerName;

    /** 客户类型  0:零散，1:合同 */
    @ApiModelProperty("客户类型  0:零散，1:合同")
    @Excel(name = "客户类型  0:零散，1:合同")
    private Integer customerType;

    /** 实际到达时间 */
    @ApiModelProperty("实际到达时间")
    @JsonFormat(timezone="GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "实际到达时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date factArriveTime;

    /** 实际发运时间 */
    @ApiModelProperty("实际发运时间")
    @JsonFormat(timezone="GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "实际发运时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date factLeaveTime;

    /** 结算方式 */
    @ApiModelProperty("结算方式")
    @Excel(name = "结算方式")
    private Integer feeType;

    /** 交付方式 */
    @ApiModelProperty("交付方式")
    @Excel(name = "交付方式")
    private Integer handoverType;

    /** 是否有异常 */
    @ApiModelProperty("是否有异常")
    @Excel(name = "是否有异常")
    private Integer isAbnormal;

    /** 是否回单 */
    @ApiModelProperty("是否回单")
    @Excel(name = "是否回单")
    private Integer isBack;

    /** 件数 */
    @ApiModelProperty("件数")
    @Excel(name = "件数")
    private Integer number;

    /** 实际件数 */
    @ApiModelProperty("实际件数")
    @Excel(name = "实际件数")
    private Integer actNumber;

    /** 距离 */
    @ApiModelProperty("距离")
    @Excel(name = "距离")
    private Double orderMileage;

    /** 要求到达时间 */
    @ApiModelProperty("要求到达时间")
    @JsonFormat(timezone="GMT+8", pattern = "yyyy-MM-dd")
    @Excel(name = "要求到达时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date planArriveTime;

    /** 要求发运时间 */
    @ApiModelProperty("要求发运时间")
    @JsonFormat(timezone="GMT+8", pattern = "yyyy-MM-dd")
    @Excel(name = "要求发运时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date planLeaveTime;

    /** 客户订单号1 */
    @ApiModelProperty("客户订单号1")
    @Excel(name = "客户订单号1")
    private String relateBill1;

    /** 客户订单号2 */
    @ApiModelProperty("客户订单号2")
    @Excel(name = "客户订单号2")
    private String relateBill2;

    /** 客户订单号3 */
    @ApiModelProperty("客户订单号3")
    @Excel(name = "客户订单号3")
    private String relateBill3;

    /** 客户订单号4 */
    @ApiModelProperty("客户订单号4")
    @Excel(name = "客户订单号4")
    private String relateBill4;

    /** 客户订单号5 */
    @ApiModelProperty("客户订单号5")
    @Excel(name = "客户订单号5")
    private String relateBill5;

    /** 销售负责人 */
    @ApiModelProperty("销售负责人")
    @Excel(name = "销售负责人")
    private String salePerson;

    /** 运输方式 */
    @ApiModelProperty("运输方式")
    @Excel(name = "运输方式")
    private Integer shipmentMethod;

    /** 订单日期 */
    @ApiModelProperty("订单日期")
    @JsonFormat(timezone="GMT+8", pattern = "yyyy-MM-dd")
    @Excel(name = "订单日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date time;

    /** 运输性质 */
    @ApiModelProperty("运输性质")
    @Excel(name = "运输性质")
    private Integer transportPro;

    /** 货值 */
    @ApiModelProperty("货值")
    @Excel(name = "货值")
    private BigDecimal value;

    /** 体积 */
    @ApiModelProperty("体积")
    @Excel(name = "体积")
    private BigDecimal volume;

    /** 重量 */
    @ApiModelProperty("重量")
    @Excel(name = "重量")
    private BigDecimal weight;

    /** 客户id */
    @ApiModelProperty("客户id")
    @Excel(name = "客户id")
    private Long jcCustomerId;

    /** 目的运点ID */
    @ApiModelProperty("目的运点ID")
    @Excel(name = "目的运点ID")
    private Long jcEndZoneId;

    /** 订单id */
    @ApiModelProperty("订单id")
    @Excel(name = "订单id")
    private Long jcOrderId;

    /** 当前组织机构id */
    @Dict(dictTable = "jc_sys_organization", dictLabel = "name", dictValue = "id")
    @ApiModelProperty("当前组织机构id")
    @Excel(name = "当前组织机构id")
    private Long jcOrganizationId;

    /** 预录单ID */
    @ApiModelProperty("预录单ID")
    @Excel(name = "预录单ID")
    private Long jcPrescoId;

    /** 派车单id */
    @ApiModelProperty("派车单id")
    @Excel(name = "派车单id")
    private Long jcDispatchId;

    /** 出发运点id */
    @ApiModelProperty("出发运点id")
    @Excel(name = "出发运点id")
    private Long jcStartZoneId;

    /** 目的网点ID */
    @Dict(dictTable = "jc_sys_organization", dictLabel = "name", dictValue = "id")
    @ApiModelProperty("目的网点ID")
    @Excel(name = "目的网点ID")
    private Long jcToOrganizationId;

    /** 站点路由 */
    @ApiModelProperty("站点路由")
    @Excel(name = "站点路由")
    private String routerOrgIds;

    /** 库存区域id */
    @ApiModelProperty("库存区域id")
    @Excel(name = "库存区域id")
    private Long jcZoneStoreroomId;

    /** 始发网点 */
    @Dict(dictTable = "jc_sys_organization", dictLabel = "name", dictValue = "id")
    @ApiModelProperty("始发网点")
    @Excel(name = "始发网点")
    private Long jcFormOrganizationId;

    /** 提货/派送 */
    @ApiModelProperty("提货/派送")
    @Excel(name = "提货/派送")
    private Integer type;

    /** 代收货款 */
    @ApiModelProperty("代收货款")
    @Excel(name = "代收货款")
    private BigDecimal agent;

    /** 签收时间 */
    @ApiModelProperty("签收时间")
    @JsonFormat(timezone="GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "签收时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date qsTime;

    /** 签收人 */
    @Dict(dictTable = "sys_user", dictLabel = "nick_name", dictValue = "user_id")
    @ApiModelProperty("签收人")
    @Excel(name = "签收人")
    private String qsPerson;

    /** 签收单图片 */
    @ApiModelProperty("签收单图片")
    @Excel(name = "签收单图片")
    private String qsImgs;

    /** 计重 */
    @ApiModelProperty("计重")
    @Excel(name = "计重")
    private BigDecimal jzWeight;

    /** 到付款 */
    @ApiModelProperty("到付款")
    @Excel(name = "到付款")
    private BigDecimal arrivePay;

    /** 运单ID */
    @ApiModelProperty("运单ID")
    @Excel(name = "运单ID")
    private Long jcShipmentId;

    @TableField(exist = false)
    private List<JcLedReceivingParty> ledReceivingParties;

    @TableField(exist = false)
    private List<JcLedProduct> ledProducts;

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("code", getCode())
            .append("createName", getCreateName())
            .append("createTime", getCreateTime())
            .append("description", getDescription())
           
            .append("modifyName", getModifyName())
            .append("modifyTime", getModifyTime())
            .append("name", getName())
            .append("status", getStatus())
            .append("backNumber", getBackNumber())
            .append("customerIsExceed", getCustomerIsExceed())
            .append("customerName", getCustomerName())
            .append("customerType", getCustomerType())
            .append("factArriveTime", getFactArriveTime())
            .append("factLeaveTime", getFactLeaveTime())
            .append("feeType", getFeeType())
            .append("handoverType", getHandoverType())
            .append("isAbnormal", getIsAbnormal())
            .append("isBack", getIsBack())
            .append("number", getNumber())
            .append("actNumber", getActNumber())
            .append("orderMileage", getOrderMileage())
            .append("planArriveTime", getPlanArriveTime())
            .append("planLeaveTime", getPlanLeaveTime())
            .append("relateBill1", getRelateBill1())
            .append("relateBill2", getRelateBill2())
            .append("relateBill3", getRelateBill3())
            .append("relateBill4", getRelateBill4())
            .append("relateBill5", getRelateBill5())
            .append("salePerson", getSalePerson())
            .append("shipmentMethod", getShipmentMethod())
            .append("time", getTime())
            .append("transportPro", getTransportPro())
            .append("value", getValue())
            .append("volume", getVolume())
            .append("weight", getWeight())
            .append("jcCustomerId", getJcCustomerId())
            .append("jcEndZoneId", getJcEndZoneId())
            .append("jcOrderId", getJcOrderId())
            .append("jcOrganizationId", getJcOrganizationId())
            .append("jcPrescoId", getJcPrescoId())
            .append("jcDispatchId", getJcDispatchId())
            .append("jcStartZoneId", getJcStartZoneId())
            .append("jcToOrganizationId", getJcToOrganizationId())
            .append("routerOrgIds", getRouterOrgIds())
            .append("jcZoneStoreroomId", getJcZoneStoreroomId())
            .append("jcFormOrganizationId", getJcFormOrganizationId())
            .append("type", getType())
            .append("agent", getAgent())
            .append("qsTime", getQsTime())
            .append("qsPerson", getQsPerson())
            .append("qsImgs", getQsImgs())
            .append("jzWeight", getJzWeight())
            .append("arrivePay", getArrivePay())
            .append("jcShipmentId", getJcShipmentId())
            .toString();
    }
}
